<template>
  <div>
    <el-form-item label="内容颜色">
      <el-color-picker
        v-model="value.__config.contentColor"
        :predefine="predefineColors"
      ></el-color-picker>
    </el-form-item>
    <el-form-item label="内容加粗" class="tr">
      <el-switch v-model="value.__config.contentBold"></el-switch>
    </el-form-item>
  </div>
</template>

<script>
import basicmixins from "./basicmixins";
import { PREDEFINE_COLORS } from "@/utils/const";

export default {
  mixins: [basicmixins],
  data() {
    return {
      predefineColors: PREDEFINE_COLORS,
    };
  },
  created() {
    if (!this.value.__config.contentColor) {
      this.$set(this.value.__config, "contentColor", "#666");
    }
    if (!this.value.__config.contentBold) {
      this.$set(this.value.__config, "contentBold", false);
    }
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
::v-deep .el-form-item--mini.el-form-item,
.el-form-item--small.el-form-item {
  margin-bottom: 8px;
}
</style>
